package com.linux.huhx.business.action;

import org.apache.ibatis.session.RowBounds;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @Author: huhx
 * @Date: 2017-11-02 下午 3:24
 */

@RestController
@RequestMapping("/huhx")
public class MybatisQueryAction {

    @Resource
    private SqlSessionTemplate sqlSessionTemplate;

    @GetMapping("/mybatis")
    public Map<String, Object> queryMybatisDatas(HttpServletRequest request) {
        int currentIndex = Integer.valueOf(request.getParameter("index"));
        int pageSize = 10;
        RowBounds rowBounds = new RowBounds(currentIndex, pageSize);
//        this.sqlSessionTemplate.selectList("")
        return null;
    }
}
